package com.xnyzc.lhy.common.penum.pay;

public enum EPayMoneyLock {

    yes(0, "解锁"),
    no(1, "加锁");

    private Integer type;
    private String value;

    EPayMoneyLock(Integer type, String value) {
        this.type = type;
        this.value = value;
    }

    public static EPayMoneyLock findById(Integer type) {
        EPayMoneyLock ePayMoneyLock;
        switch (type) {
            case 0:
                ePayMoneyLock = EPayMoneyLock.yes;
                break;
            case 1:
                ePayMoneyLock = EPayMoneyLock.no;
                break;
            default:
                throw new IllegalArgumentException("非法type");
        }
        return ePayMoneyLock;
    }

    public String getValue() {
        return this.value;
    }

    public Integer getType() {
        return this.type;
    }
}
